package com.jblv.frame.web.controller;

import com.jblv.frame.common.dto.PageResult;
import com.jblv.frame.common.dto.UserTokenDTO;
import com.jblv.frame.common.message.Result;
import com.jblv.frame.user.api.dto.SysUserDTO;
import com.jblv.frame.user.api.dto.UserLoginResultDTO;
import com.jblv.frame.user.api.entity.SysUser;
import com.jblv.frame.user.api.params.SysUserListParams;
import com.jblv.frame.user.api.params.UserLoginParams;

/**
 * @author happyonion.yangtao
 * @version 1.0
 * @title ISysUserController
 * @projectName jblv-frame
 * @packageName com.jblv.web.controller
 * @description ISysUserController 管理员Controller接口类
 * @date Create at 2020/4/27 22:47
 * @since jdk1.8
 */
public interface ISysUserController {

    /**
     * 获取当前登录管理员
     * @return SysUser
     */
    Result<UserLoginResultDTO> getInfo();

    /**
     * 根据id获取管理员ID
     * @param id
     * @return SysUser
     */
    Result<SysUser> get(String id);

    /**
     * 获取管理员列表
     * @param params
     * @return PageResult
     */
    Result<PageResult<SysUserDTO>> getList(SysUserListParams params);

    /**
     * 创建管理员
     * @param sysUserDTO
     * @return Boolean
     */
    Result<String> save(SysUserDTO sysUserDTO);

    /**
     * 删除管理员根据ID
     * @param id
     * @return Boolean
     */
    Result<Boolean> del(String id);

    /**
     * 更新管理员
     * @param sysUserDTO
     * @return Boolean
     */
    Result<Boolean> update(SysUserDTO sysUserDTO);

    Result<Boolean> status(String id ,Integer status);

    Result<UserTokenDTO> pwdLogin(UserLoginParams params);

    Result<Boolean> logout();

}
